package com.first.system.controller;

import com.first.common.pojo.TbArticle;
import com.first.common.vo.Result;
import com.first.system.service.BottomArticleService;
import com.first.system.vo.BottomArticleVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: first-project
 * @description:
 * @author: 闫锦超
 * @create: 2023-05-30 16:09
 **/
@RestController
@RequestMapping("/home/article")
@Api(tags = "底部文章管理")
public class BottomArticleController {
    @Autowired
    private BottomArticleService bottomArticleService;
    @PostMapping("/getArticleByNavId")
    @ApiOperation(value = "查询所有的底部文章")
    public Result getArticleByNavId(@RequestBody BottomArticleVo bottomArticleVo){
       return bottomArticleService.getArticleByNavId(bottomArticleVo);
    }

    @PostMapping("/updateArticleByNavId")
    @ApiOperation(value = "修改文章描述")
    public Result updateArticleByNavId(@RequestBody TbArticle tbArticle){
            return bottomArticleService.updateArticleByNavId(tbArticle);
    }
}
